# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Florian Pritz <bluewind@xinu.at>
# Contributor: Martchus <martchus@gmx.net>

pkgname=libfilezilla
epoch=1
pkgver=0.42.2
pkgrel=1
pkgdesc='Small and modern C++ library, offering some basic functionality to build high-performing, platform-independent programs'
url='https://lib.filezilla-project.org/'
arch=('loong64' 'x86_64')
license=('GPL')
depends=('glibc' 'gcc-libs' 'nettle' 'gnutls' 'libnettle.so' 'libhogweed.so')
makedepends=(clang)
checkdepends=('cppunit')
provides=('libfilezilla.so')
source=(https://download.filezilla-project.org/libfilezilla/libfilezilla-${pkgver}.tar.xz)
sha512sums=('a453854f3a7143a63a2fc79458096e9b8f2f6a07f480cb15a0c0873a4cc147c0373d6f1647e1dd3dece015fbdedc3ce3085d4c7d26c801c0948fd1c593fd6d8c')
b2sums=('08d4f48d4b4d38ba8cc52779d7e3b589d5bd7c76a2ab74f668064e49c4eb1d85f676715f363baae0660a2d04def82aed53e57e4bc7e9f97f0934802adc523c1d')

build() {
  cd ${pkgname}-${pkgver}
  export CXX=clang++
  export CC=clang
  ./configure \
    --prefix=/usr \
    --disable-static
  make
}

check() {
  cd ${pkgname}-${pkgver}
  # LANG needed to fix string_test::test_conversion2
  LANG=en_US.UTF-8 make check
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:
